package com.huiquan.framework.dao;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Repository;

import com.huiquan.framework.base.EnhancedBaseDao;
import com.huiquan.framework.domain.Email;
import com.ibatis.sqlmap.client.SqlMapClient;

@Repository
public class EmailDao extends EnhancedBaseDao<Email> {

	@Resource(name = "sqlMapClient")
	private SqlMapClient sqlMapClient;

	public static final String space = "EMAIL.";

	public EmailDao() {
		super(space);
	}
	
	@SuppressWarnings("unchecked")
	public List<String> retrieveAddressList(String group) {
		Map<String, Object> param = new HashMap<>();
		param.put("group", group);
		
		return (List<String>)this.list(space + "RETRIEVE_ADDRESS_LIST", param, sqlMapClient);
	}
}
